#!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'poppy'
from bs4 import BeautifulSoup


with open('d:/dakle.html','r') as fw:
    html = fw.read()
    soup = BeautifulSoup(html)
    qd_form = soup.find_all(id="qiandao")[0]
    s_action = qd_form['action']
    print 's_action is : %s' %s_action
    inputes = soup.find_all("input")
    s_formhash = ''
    s_qdxq = 'kx'
    s_qdmode = '1'
    for input in inputes:
        if input['name']=='formhash':
            s_formhash = input['value']
            break
    
    print s_formhash
    
with open('d:/result.html','r') as result :
    result_soup = BeautifulSoup(result.read())
    for c in result_soup.find_all("div",class_="c"):
        print c.get_text()
     